package com.pixiv.Entity;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.HashMap;

@Scope("prototype")
@Component
public class GetVarVector {

    private HashMap<String,Integer> VarInteger = new HashMap();
    private HashMap<String,String> VarString = new HashMap();
    private HashMap<String,Object> Var = new HashMap();

    public void clearInt(){
        VarInteger = new HashMap();
    }
    public void clearString(){
        VarString = new HashMap();
    }

    public void clear(){
        Var = new HashMap();
    }

    public void push_vector(String n,Object o){
        Var.put(n,o);
    }
    public Object get_vector(String n){
        return Var.get(n);
    }
    public void set_vector(String n,Object o){
        Var.put(n,o);
    }

    public int getInt(String n){
        return VarInteger.get(n);
    }

    public String getString(String n){
        return VarString.get(n);
    }

    public void pushInt(String n,int v){
        VarInteger.put(n,v);
    }

    public void pushString(String n,String v){
        VarString.put(n,v);
    }


    public HashMap<String, Object> getVar() {
        return Var;
    }

    public void setVar(HashMap<String, Object> var) {
        Var = var;
    }
}
